import {createRouter,createWebHistory,RouteRecordRaw} from "vue-router"

//配置路由
const routes:Array<RouteRecordRaw>=[
    {
        path:"/home",
        name:"home",
        component:()=>import('../components/Home.vue'),
        meta: { 
            title:"首页",
            keepAlive: true, 
           } 
    },
    {
        path:"/article",
        name:"article",
        component:()=>import('../components/Article.vue'),
        meta: { 
            title:"文章",
            keepAlive: false, 
           } 
    }
]

const router=createRouter({
    history:createWebHistory(),
    routes
})
//导出
export default router;